<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE HTML >
<html>
<head>
	<%@include file="/commons/easyHead.jsp" %>
	<%@include file="/commons/importCryptoJs.jsp" %>
	<%--	<%
			String redirect = request.getParameter("redirect");
		%>--%>
	<title>
		登陆
	</title>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="sunment">
	<script type="text/javascript"
			src="${path}/commons/browser/js/device.js"></script>
	<style type="text/css">
		.easyui-fluid {
			margin-left: 32%;
			margin-top: 10%
		}
	</style>
</head>
<body class="easyui-layout">
<!-- <div region="north">
	<form id="formLogin" method="post">
		<table class="tableForm">
			<tr>
				<th style="width: 80px;">账号：</th>
				<td><input id="username" name="username" class="easyui-validatebox"
						   data-options="required:true"/></td>
			</tr>
			<tr>
				<th style="width: 80px;">密码：</th>
				<td><input id="password" name="password" class="easyui-validatebox" type="password"
						   data-options="required:true"/></td>
			</tr>
		</table>
	</form>
	<div style="margin-left:auto;margin-right:2px">
		<a class="easyui-linkbutton c6" iconcls="icon-ok" onclick="login()">登陆</a>
	</div>
</div> -->
<div region="center">
	<div id="deviceInfoBox"
		 style="position: absolute; bottom: 10px; right: 10px; z-index: 999;"></div>
	<img src="${path}/resources/images/background.jpg" style="width:100%;position:absolute;"/>
	<div id="panel" class="easyui-panel"
		 style="width:36%; min-width:400px; min-height:260px;padding:4% 10px; position:absolute;">
		<div id="panelLeft" style="width:40%;float:left;line-height: 30px;">
			<img src="${path}/resources/images/logo.png"/>
			<div style="color: #0286bd; font-size: 42px; font-family: 华文新魏;">安全管理</div>
		</div>
		<div style="float:left; width: 2%; padding: 0 10px;">
			<hr style="width:1px;height:150px;" color="#C1C1C1"/>
		</div>
		<div id="panelRight" style="width:52%; float:left; line-height: 30px;">
			<div style="color: #0286bd; font-size: 30px;margin-bottom: 10px;">登录</div>
			<form id="formLogin" method="post">
				<table class="tableForm">
					<tr>
						<th style="width: 50px;">账号：</th>
						<td><input id="username" name="username" class="easyui-validatebox"
								   data-options="required:true" value="admin"/></td>
					</tr>
					<tr>
						<th style="width: 50px;">密码：</th>
						<td><input id="password" name="password" class="easyui-validatebox"
								   type="password"
								   data-options="required:true" value="123456"/></td>
					</tr>
					<tr>
						<th></th>
						<td style="text-align: right;">
							<input class="easyui-checkbox" name="saveLogin" type="checkbox"/>
							<span>记住7天&nbsp;&nbsp;</span>
							<a class="easyui-linkbutton c6" onclick="loginUtils.loginBtn()"
							   style="padding:2px 10px;font-size:14px;margin-right: 5px;">登陆</a>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">

	/**
	 * 弹窗显示信息
	 * @param msg
	 */
	loginUtils.showMsg= function (msg) {
		$.messager.alert('警告', msg);
	};

	/**
	 * 登录成功弹窗
	 * @param msg
	 */
	loginUtils.show= function (msg) {
		$.messager.show({
			title: '登录提示',
			msg: msg,
			timeout: 3000,
			showType: 'slide'
		});
	};

	/**
	 * 确认弹窗
	 */
	loginUtils.confirm= function (msg, okFun, cancelFun) {
		$.messager.confirm('提示', msg, function (res) {
			if (res) {
				if (jQuery.isFunction(okFun)) okFun();
			} else {
				if (jQuery.isFunction(cancelFun)) cancelFun();
			}
			return res;
		});
	};


	$(document).ready(function () {

		/*
		 *	登录按钮绑定，登录状态确认等
		 */
		loginUtils.checkLogin('${sessionScope.CURRENT_USER_ID}');
	});
</script>
</body>
</html>